package org.atovio.tx.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Options;
import org.atovio.tx.pojo.People;

/**
 * @author AtoVio, Winter Yuan
 */
public interface PeopleMapper {

    @Insert("""
            insert into people(name, age, provenance_id, sex, country, cv_id)
            values (#{name}, #{age},#{provenanceId},#{sex},#{country},#{cvId})
            """)
    // 可选的配置，可以得到mybatis生成的自动增长的主键值
    @Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id")
    int insertPeople(People people);
}
